<template>
  <div class="home">
    <homeView v-if="active == 0" />
    <myView v-if="active == 1" />
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item icon="friends-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import homeView from "./homeView";
import myView from "./myView.vue";
export default {
  name: "IndexView",
  components: {
    homeView,
    myView,
  },
  data() {
    return {
      active: 0,
    };
  },
};
</script>
<style lang="less">
.van-tabbar {
  background-color: #c3ddfb !important;
}
.van-tabbar-item--active {
  background-color: #318bfc !important;
  .van-tabbar-item__icon {
    color: #000 !important;
  }
}
.van-tabbar-item__text {
  color: #000 !important;
}
</style>
